.class public Lcom/brixd/niceapp/community/activity/AlbumActivity;
.super Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;
.source "AlbumActivity.java"


# static fields
.field public static final REQUEST_CODE_VIEW_PICTURE:I = 0xa

.field public static final REQUEST_CODE_VIEW_SELECTED_PICTURE:I = 0x14


# instance fields
.field private mAdapter:Lcom/brixd/niceapp/community/adapter/AlbumAdapter;

.field private mAlbumId:J

.field private mDoneBtn:Landroid/widget/Button;

.field private mGridView:Landroid/widget/GridView;

.field private mIsDirty:Z

.field private mLastSelectedCount:I

.field private mPictures:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/model/PictureModel;",
            ">;"
        }
    .end annotation
.end field

.field private mPreviewBtn:Landroid/widget/Button;

.field private mSelectedPictures:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/model/PictureModel;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>()V
    .registers 2

    .prologue
    .line 32
    invoke-direct {p0}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;-><init>()V

    .line 39
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mPictures:Ljava/util/ArrayList;

    .line 40
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mSelectedPictures:Ljava/util/ArrayList;

    return-void
.end method

.method static synthetic access$000(Lcom/brixd/niceapp/community/activity/AlbumActivity;)I
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;

    .prologue
    .line 32
    iget v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mLastSelectedCount:I

    return v0
.end method

.method static synthetic access$100(Lcom/brixd/niceapp/community/activity/AlbumActivity;)Ljava/util/ArrayList;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;

    .prologue
    .line 32
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mSelectedPictures:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$1000(Lcom/brixd/niceapp/community/activity/AlbumActivity;)J
    .registers 3
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;

    .prologue
    .line 32
    iget-wide v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mAlbumId:J

    return-wide v0
.end method

.method static synthetic access$1100(Lcom/brixd/niceapp/community/activity/AlbumActivity;)Landroid/app/Activity;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;

    .prologue
    .line 32
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->getActivity()Landroid/app/Activity;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$1200(Lcom/brixd/niceapp/community/activity/AlbumActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;

    .prologue
    .line 32
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$1300(Lcom/brixd/niceapp/community/activity/AlbumActivity;)Landroid/app/Activity;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;

    .prologue
    .line 32
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->getActivity()Landroid/app/Activity;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$1400(Lcom/brixd/niceapp/community/activity/AlbumActivity;)Landroid/app/Activity;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;

    .prologue
    .line 32
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->getActivity()Landroid/app/Activity;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$1500(Lcom/brixd/niceapp/community/activity/AlbumActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;

    .prologue
    .line 32
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$1600(Lcom/brixd/niceapp/community/activity/AlbumActivity;)Lcom/brixd/niceapp/community/adapter/AlbumAdapter;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;

    .prologue
    .line 32
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mAdapter:Lcom/brixd/niceapp/community/adapter/AlbumAdapter;

    return-object v0
.end method

.method static synthetic access$200(Lcom/brixd/niceapp/community/activity/AlbumActivity;Lcom/brixd/niceapp/community/model/PictureModel;)V
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;
    .param p1, "x1"    # Lcom/brixd/niceapp/community/model/PictureModel;

    .prologue
    .line 32
    invoke-direct {p0, p1}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->addPictureToSelected(Lcom/brixd/niceapp/community/model/PictureModel;)V

    return-void
.end method

.method static synthetic access$300(Lcom/brixd/niceapp/community/activity/AlbumActivity;Lcom/brixd/niceapp/community/model/PictureModel;)V
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;
    .param p1, "x1"    # Lcom/brixd/niceapp/community/model/PictureModel;

    .prologue
    .line 32
    invoke-direct {p0, p1}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->removePictureFromSelected(Lcom/brixd/niceapp/community/model/PictureModel;)V

    return-void
.end method

.method static synthetic access$400(Lcom/brixd/niceapp/community/activity/AlbumActivity;)V
    .registers 1
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;

    .prologue
    .line 32
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->updatePreviewBtn()V

    return-void
.end method

.method static synthetic access$500(Lcom/brixd/niceapp/community/activity/AlbumActivity;)Z
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;

    .prologue
    .line 32
    iget-boolean v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mIsDirty:Z

    return v0
.end method

.method static synthetic access$502(Lcom/brixd/niceapp/community/activity/AlbumActivity;Z)Z
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;
    .param p1, "x1"    # Z

    .prologue
    .line 32
    iput-boolean p1, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mIsDirty:Z

    return p1
.end method

.method static synthetic access$600(Lcom/brixd/niceapp/community/activity/AlbumActivity;)Landroid/app/Activity;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;

    .prologue
    .line 32
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->getActivity()Landroid/app/Activity;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$700(Lcom/brixd/niceapp/community/activity/AlbumActivity;)Landroid/content/Context;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;

    .prologue
    .line 32
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->getContext()Landroid/content/Context;

    move-result-object v0

    return-object v0
.end method

.method static synthetic access$800(Lcom/brixd/niceapp/community/activity/AlbumActivity;)Ljava/util/ArrayList;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;

    .prologue
    .line 32
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mPictures:Ljava/util/ArrayList;

    return-object v0
.end method

.method static synthetic access$900(Lcom/brixd/niceapp/community/activity/AlbumActivity;)Landroid/app/Activity;
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/community/activity/AlbumActivity;

    .prologue
    .line 32
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->getActivity()Landroid/app/Activity;

    move-result-object v0

    return-object v0
.end method

.method private addPictureToSelected(Lcom/brixd/niceapp/community/model/PictureModel;)V
    .registers 3
    .param p1, "model"    # Lcom/brixd/niceapp/community/model/PictureModel;

    .prologue
    .line 307
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mSelectedPictures:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_d

    .line 308
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mSelectedPictures:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 310
    :cond_d
    return-void
.end method

.method private computeBorderWidth(II)I
    .registers 6
    .param p1, "padding"    # I
    .param p2, "space"    # I

    .prologue
    .line 205
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

    move-result-object v1

    iget v0, v1, Landroid/util/DisplayMetrics;->widthPixels:I

    .line 206
    .local v0, "screenWidth":I
    sub-int v1, v0, p1

    mul-int/lit8 v2, p2, 0x2

    sub-int/2addr v1, v2

    div-int/lit8 v1, v1, 0x3

    return v1
.end method

.method private inflateSelectedPictures(Ljava/util/ArrayList;)V
    .registers 10
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/community/model/PictureModel;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 275
    .local p1, "handledPictures":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/community/model/PictureModel;>;"
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mSelectedPictures:Ljava/util/ArrayList;

    invoke-virtual {v4}, Ljava/util/ArrayList;->clear()V

    .line 277
    if-nez p1, :cond_8

    .line 296
    :cond_7
    return-void

    .line 281
    :cond_8
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_9
    invoke-virtual {p1}, Ljava/util/ArrayList;->size()I

    move-result v4

    if-ge v0, v4, :cond_7

    .line 282
    invoke-virtual {p1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/brixd/niceapp/community/model/PictureModel;

    .line 283
    .local v3, "selectedPicture":Lcom/brixd/niceapp/community/model/PictureModel;
    const/4 v1, 0x0

    .local v1, "j":I
    :goto_16
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v4}, Ljava/util/ArrayList;->size()I

    move-result v4

    if-ge v1, v4, :cond_56

    .line 284
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v4, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/brixd/niceapp/community/model/PictureModel;

    invoke-virtual {v4}, Lcom/brixd/niceapp/community/model/PictureModel;->getId()J

    move-result-wide v4

    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/PictureModel;->getId()J

    move-result-wide v6

    cmp-long v4, v4, v6

    if-nez v4, :cond_53

    .line 285
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v4, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/brixd/niceapp/community/model/PictureModel;

    .line 286
    .local v2, "picture":Lcom/brixd/niceapp/community/model/PictureModel;
    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/PictureModel;->isChecked()Z

    move-result v4

    invoke-virtual {v2, v4}, Lcom/brixd/niceapp/community/model/PictureModel;->setIsChecked(Z)V

    .line 287
    invoke-virtual {v3}, Lcom/brixd/niceapp/community/model/PictureModel;->isCover()Z

    move-result v4

    invoke-virtual {v2, v4}, Lcom/brixd/niceapp/community/model/PictureModel;->setIsCover(Z)V

    .line 289
    invoke-virtual {v2}, Lcom/brixd/niceapp/community/model/PictureModel;->isChecked()Z

    move-result v4

    if-eqz v4, :cond_53

    .line 290
    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mSelectedPictures:Ljava/util/ArrayList;

    invoke-virtual {v4, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 283
    .end local v2    # "picture":Lcom/brixd/niceapp/community/model/PictureModel;
    :cond_53
    add-int/lit8 v1, v1, 0x1

    goto :goto_16

    .line 281
    :cond_56
    add-int/lit8 v0, v0, 0x1

    goto :goto_9
.end method

.method private initData()V
    .registers 5

    .prologue
    .line 75
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "AlbumId"

    const-wide/16 v2, 0x0

    invoke-virtual {v0, v1, v2, v3}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J

    move-result-wide v0

    iput-wide v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mAlbumId:J

    .line 76
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "LastSelectedCount"

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v0

    iput v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mLastSelectedCount:I

    .line 78
    new-instance v0, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;

    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mPictures:Ljava/util/ArrayList;

    invoke-direct {v0, p0, v1}, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;-><init>(Landroid/content/Context;Ljava/util/ArrayList;)V

    iput-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mAdapter:Lcom/brixd/niceapp/community/adapter/AlbumAdapter;

    .line 79
    iget-wide v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mAlbumId:J

    invoke-direct {p0, v0, v1}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->initPictures(J)V

    .line 80
    return-void
.end method

.method private initPictures(J)V
    .registers 12
    .param p1, "albumId"    # J

    .prologue
    .line 213
    const/4 v4, 0x3

    :try_start_1
    new-array v0, v4, [Ljava/lang/String;

    const/4 v4, 0x0

    const-string v5, "_id"

    aput-object v5, v0, v4

    const/4 v4, 0x1

    const-string v5, "_display_name"

    aput-object v5, v0, v4

    const/4 v4, 0x2

    const-string v5, "_data"

    aput-object v5, v0, v4

    .line 214
    .local v0, "columns":[Ljava/lang/String;
    const-string v2, "date_modified DESC "

    .line 216
    .local v2, "orderBy":Ljava/lang/String;
    const/4 v4, 0x1

    new-array v3, v4, [Ljava/lang/String;

    const/4 v4, 0x0

    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, ""

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    aput-object v5, v3, v4

    .line 218
    .local v3, "selectionArgs":[Ljava/lang/String;
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->getLoaderManager()Landroid/app/LoaderManager;

    move-result-object v4

    const/4 v5, 0x0

    const/4 v6, 0x0

    new-instance v7, Lcom/brixd/niceapp/community/activity/AlbumActivity$7;

    invoke-direct {v7, p0, v0, v3}, Lcom/brixd/niceapp/community/activity/AlbumActivity$7;-><init>(Lcom/brixd/niceapp/community/activity/AlbumActivity;[Ljava/lang/String;[Ljava/lang/String;)V

    invoke-virtual {v4, v5, v6, v7}, Landroid/app/LoaderManager;->initLoader(ILandroid/os/Bundle;Landroid/app/LoaderManager$LoaderCallbacks;)Landroid/content/Loader;
    :try_end_3b
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_3b} :catch_3c

    .line 261
    .end local v0    # "columns":[Ljava/lang/String;
    .end local v2    # "orderBy":Ljava/lang/String;
    .end local v3    # "selectionArgs":[Ljava/lang/String;
    :goto_3b
    return-void

    .line 258
    :catch_3c
    move-exception v1

    .line 259
    .local v1, "e":Ljava/lang/Exception;
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_3b
.end method

.method private initWidgets()V
    .registers 7

    .prologue
    const/16 v5, 0x8

    .line 83
    const v3, 0x7f0a0068

    invoke-virtual {p0, v3}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/Button;

    iput-object v3, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mPreviewBtn:Landroid/widget/Button;

    .line 84
    const v3, 0x7f0a0069

    invoke-virtual {p0, v3}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/Button;

    iput-object v3, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mDoneBtn:Landroid/widget/Button;

    .line 85
    const v3, 0x7f0a0067

    invoke-virtual {p0, v3}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/GridView;

    iput-object v3, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mGridView:Landroid/widget/GridView;

    .line 86
    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mGridView:Landroid/widget/GridView;

    invoke-virtual {v3}, Landroid/widget/GridView;->getPaddingLeft()I

    move-result v3

    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mGridView:Landroid/widget/GridView;

    invoke-virtual {v4}, Landroid/widget/GridView;->getPaddingRight()I

    move-result v4

    add-int v1, v3, v4

    .line 87
    .local v1, "padding":I
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f09005d

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v2

    .line 88
    .local v2, "space":I
    invoke-direct {p0, v1, v2}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->computeBorderWidth(II)I

    move-result v0

    .line 89
    .local v0, "borderWidth":I
    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mAdapter:Lcom/brixd/niceapp/community/adapter/AlbumAdapter;

    invoke-virtual {v3, v0}, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->setBorderWidth(I)V

    .line 90
    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mGridView:Landroid/widget/GridView;

    const/4 v4, 0x3

    invoke-virtual {v3, v4}, Landroid/widget/GridView;->setNumColumns(I)V

    .line 91
    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mGridView:Landroid/widget/GridView;

    iget-object v4, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mAdapter:Lcom/brixd/niceapp/community/adapter/AlbumAdapter;

    invoke-virtual {v3, v4}, Landroid/widget/GridView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 93
    invoke-virtual {p0, v5}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->setTopTitleVisibility(I)V

    .line 94
    invoke-virtual {p0, v5}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->setSearchAreaVisibility(I)V

    .line 95
    const v3, 0x7f0c0007

    invoke-virtual {p0, v3}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->setBackText(I)V

    .line 96
    const v3, 0x7f0c003a

    invoke-virtual {p0, v3}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->setCommitBtnText(I)V

    .line 97
    invoke-virtual {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v3

    const v4, 0x7f08006a

    invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getColor(I)I

    move-result v3

    invoke-virtual {p0, v3}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->setCommitBtnTextColor(I)V

    .line 99
    iget-object v3, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mDoneBtn:Landroid/widget/Button;

    const v4, 0x7f0c005b

    invoke-virtual {v3, v4}, Landroid/widget/Button;->setText(I)V

    .line 100
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->updatePreviewBtn()V

    .line 101
    return-void
.end method

.method private initWidgetsActions()V
    .registers 3

    .prologue
    .line 104
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mAdapter:Lcom/brixd/niceapp/community/adapter/AlbumAdapter;

    new-instance v1, Lcom/brixd/niceapp/community/activity/AlbumActivity$1;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity$1;-><init>(Lcom/brixd/niceapp/community/activity/AlbumActivity;)V

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->setOnPictureCheckedChangeListener(Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnPictureCheckedChangeListener;)V

    .line 128
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mAdapter:Lcom/brixd/niceapp/community/adapter/AlbumAdapter;

    new-instance v1, Lcom/brixd/niceapp/community/activity/AlbumActivity$2;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity$2;-><init>(Lcom/brixd/niceapp/community/activity/AlbumActivity;)V

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->setOnImageClickedListener(Lcom/brixd/niceapp/community/adapter/AlbumAdapter$OnImageClickedListener;)V

    .line 143
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mDoneBtn:Landroid/widget/Button;

    new-instance v1, Lcom/brixd/niceapp/community/activity/AlbumActivity$3;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity$3;-><init>(Lcom/brixd/niceapp/community/activity/AlbumActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 162
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mPreviewBtn:Landroid/widget/Button;

    new-instance v1, Lcom/brixd/niceapp/community/activity/AlbumActivity$4;

    invoke-direct {v1, p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity$4;-><init>(Lcom/brixd/niceapp/community/activity/AlbumActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 178
    new-instance v0, Lcom/brixd/niceapp/community/activity/AlbumActivity$5;

    invoke-direct {v0, p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity$5;-><init>(Lcom/brixd/niceapp/community/activity/AlbumActivity;)V

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->setOnCommitClickListener(Landroid/view/View$OnClickListener;)V

    .line 189
    new-instance v0, Lcom/brixd/niceapp/community/activity/AlbumActivity$6;

    invoke-direct {v0, p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity$6;-><init>(Lcom/brixd/niceapp/community/activity/AlbumActivity;)V

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->setOnBackClickListener(Landroid/view/View$OnClickListener;)V

    .line 198
    return-void
.end method

.method private refreshSelectedPictures()V
    .registers 4

    .prologue
    .line 264
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mSelectedPictures:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->clear()V

    .line 266
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_6
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->size()I

    move-result v1

    if-ge v0, v1, :cond_2a

    .line 267
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/brixd/niceapp/community/model/PictureModel;

    invoke-virtual {v1}, Lcom/brixd/niceapp/community/model/PictureModel;->isChecked()Z

    move-result v1

    if-eqz v1, :cond_27

    .line 268
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mSelectedPictures:Ljava/util/ArrayList;

    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v2, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 266
    :cond_27
    add-int/lit8 v0, v0, 0x1

    goto :goto_6

    .line 271
    :cond_2a
    return-void
.end method

.method private removePictureFromSelected(Lcom/brixd/niceapp/community/model/PictureModel;)V
    .registers 3
    .param p1, "model"    # Lcom/brixd/niceapp/community/model/PictureModel;

    .prologue
    .line 313
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mSelectedPictures:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z

    .line 314
    return-void
.end method

.method private resetSelectedPictures()V
    .registers 5

    .prologue
    const/4 v3, 0x0

    .line 299
    const/4 v0, 0x0

    .local v0, "i":I
    :goto_2
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mSelectedPictures:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    if-ge v0, v2, :cond_1b

    .line 300
    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mSelectedPictures:Ljava/util/ArrayList;

    invoke-virtual {v2, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/brixd/niceapp/community/model/PictureModel;

    .line 301
    .local v1, "selectedPicture":Lcom/brixd/niceapp/community/model/PictureModel;
    invoke-virtual {v1, v3}, Lcom/brixd/niceapp/community/model/PictureModel;->setIsChecked(Z)V

    .line 302
    invoke-virtual {v1, v3}, Lcom/brixd/niceapp/community/model/PictureModel;->setIsCover(Z)V

    .line 299
    add-int/lit8 v0, v0, 0x1

    goto :goto_2

    .line 304
    .end local v1    # "selectedPicture":Lcom/brixd/niceapp/community/model/PictureModel;
    :cond_1b
    return-void
.end method

.method private updatePreviewBtn()V
    .registers 4

    .prologue
    .line 201
    iget-object v0, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mPreviewBtn:Landroid/widget/Button;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const v2, 0x7f0c00be

    invoke-virtual {p0, v2}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, " ("

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mSelectedPictures:Ljava/util/ArrayList;

    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    const-string v2, ")"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V

    .line 202
    return-void
.end method


# virtual methods
.method public onActivityResult(IILandroid/content/Intent;)V
    .registers 8
    .param p1, "requestCode"    # I
    .param p2, "resultCode"    # I
    .param p3, "data"    # Landroid/content/Intent;

    .prologue
    const/4 v3, 0x1

    const/4 v2, -0x1

    .line 318
    invoke-super {p0, p1, p2, p3}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onActivityResult(IILandroid/content/Intent;)V

    .line 319
    const/16 v1, 0xa

    if-ne p1, v1, :cond_29

    if-ne p2, v2, :cond_29

    .line 320
    const-string v1, "Pictures"

    invoke-virtual {p3, v1}, Landroid/content/Intent;->getParcelableArrayListExtra(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v0

    .line 321
    .local v0, "pictureModels":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/community/model/PictureModel;>;"
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v1}, Ljava/util/ArrayList;->clear()V

    .line 322
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mPictures:Ljava/util/ArrayList;

    invoke-virtual {v1, v0}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    .line 323
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mAdapter:Lcom/brixd/niceapp/community/adapter/AlbumAdapter;

    invoke-virtual {v1}, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->notifyDataSetChanged()V

    .line 324
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->refreshSelectedPictures()V

    .line 326
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->updatePreviewBtn()V

    .line 327
    iput-boolean v3, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mIsDirty:Z

    .line 338
    .end local v0    # "pictureModels":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/community/model/PictureModel;>;"
    :cond_28
    :goto_28
    return-void

    .line 328
    :cond_29
    const/16 v1, 0x14

    if-ne p1, v1, :cond_28

    if-ne p2, v2, :cond_28

    .line 329
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->resetSelectedPictures()V

    .line 331
    const-string v1, "Pictures"

    invoke-virtual {p3, v1}, Landroid/content/Intent;->getParcelableArrayListExtra(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v0

    .line 332
    .restart local v0    # "pictureModels":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/community/model/PictureModel;>;"
    invoke-direct {p0, v0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->inflateSelectedPictures(Ljava/util/ArrayList;)V

    .line 333
    iget-object v1, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mAdapter:Lcom/brixd/niceapp/community/adapter/AlbumAdapter;

    invoke-virtual {v1}, Lcom/brixd/niceapp/community/adapter/AlbumAdapter;->notifyDataSetChanged()V

    .line 335
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->updatePreviewBtn()V

    .line 336
    iput-boolean v3, p0, Lcom/brixd/niceapp/community/activity/AlbumActivity;->mIsDirty:Z

    goto :goto_28
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .registers 3
    .param p1, "savedInstanceState"    # Landroid/os/Bundle;

    .prologue
    .line 50
    invoke-super {p0, p1}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onCreate(Landroid/os/Bundle;)V

    .line 51
    const v0, 0x7f03000e

    invoke-virtual {p0, v0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->setContentView(I)V

    .line 53
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->initData()V

    .line 54
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->initWidgets()V

    .line 55
    invoke-direct {p0}, Lcom/brixd/niceapp/community/activity/AlbumActivity;->initWidgetsActions()V

    .line 56
    return-void
.end method

.method protected onPause()V
    .registers 2

    .prologue
    .line 68
    invoke-super {p0}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onPause()V

    .line 70
    const-string v0, "AlbumActivity"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageEnd(Ljava/lang/String;)V

    .line 71
    invoke-static {p0}, Lcom/umeng/analytics/MobclickAgent;->onPause(Landroid/content/Context;)V

    .line 72
    return-void
.end method

.method protected onResume()V
    .registers 2

    .prologue
    .line 60
    invoke-super {p0}, Lcom/brixd/niceapp/activity/AbsActionBarSwipeBackActivity;->onResume()V

    .line 62
    const-string v0, "AlbumActivity"

    invoke-static {v0}, Lcom/umeng/analytics/MobclickAgent;->onPageStart(Ljava/lang/String;)V

    .line 63
    invoke-static {p0}, Lcom/umeng/analytics/MobclickAgent;->onResume(Landroid/content/Context;)V

    .line 64
    return-void
.end method
